<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
lang="cn" xml:lang="cn">
<head>
<title>Org-Mode Tutorial(English-Chinese)  Org-Mode简明教程（中英文对照）</title>
<meta http-equiv="Content-Type" content="text/html;charset=gbk"/>
<meta name="generator" content="Org-mode"/>
<meta name="generated" content="2007/01/01 12时15分30秒"/>
<meta name="author" content="Original Version: David O'Toole   Translate by: Hokmen Chan"/>
<style type="text/css">
  html {
	font-family: Times, serif;
	font-size: 12pt;
  }
  .title { text-align: center; }
  .todo  { color: red; }
  .done { color: green; }
  .timestamp { color: grey }
  .timestamp-kwd { color: CadetBlue }
  .tag { background-color:lightblue; font-weight:normal }
  .target { background-color: lavender; }
  pre {
	border: 1pt solid #AEBDCC;
	background-color: #F3F5F7;
	padding: 5pt;
	font-family: courier, monospace;
  }
  table { border-collapse: collapse; }
  td, th {
	vertical-align: top;
	border: 1pt solid #ADB9CC;
  }
</style>
</head><body>
<h1 class="title">Org-Mode Tutorial(English-Chinese)  Org-Mode简明教程（中英文对照）</h1>
<p>
Original Version: http://dto.freeshell.org/notebook/OrgTutorial.html
在我翻译本文档的过程中，Zhang Yunfeng在12月23日首先发布了本文档的中文
翻译(http://files.myopera.com/zhangyunfeng/org_mode_tutorial/
OrgTutorial-cn.html)。经过再三考虑，我仍然觉得应该把我自己翻译的中文
版本发出来。另外，在此版本里，为了照顾初学者，快捷键中的Ctrl没有照Emacs
的传统简化成C。特别地，对"Adding notes to a task"一节的第二段的
第二句、第三句的翻译，gilot@argo.zsu有重要贡献，谨此致谢。</p><h2>Org-Mode简明教程</h2>
<ul>
<li><a href="#sec-1">1 简介</a>
<ul>
<li><a href="#sec-2">1.1 下载Org-Mode</a></li>
<li><a href="#sec-3">1.2 安装</a></li>
</ul>
</li>
<li><a href="#sec-4">2 基本应用</a>
<ul>
<li><a href="#sec-5">2.1 新建一个文件</a></li>
<li><a href="#sec-6">2.2 简单任务列表</a></li>
<li><a href="#sec-7">2.3 使用“标题”功能建构一篇文档</a></li>
<li><a href="#sec-8">2.4 在各章节间填充</a></li>
<li><a href="#sec-9">2.5 到其他地方的链接</a></li>
<li><a href="#sec-10">2.6 文档的提纲</a></li>
<li><a href="#sec-11">2.7 给任务加注说明</a></li>
</ul>
</li>
<li><a href="#sec-12">3 高级功能简述</a>
<ul>
<li><a href="#sec-13">3.1 设置</a></li>
<li><a href="#sec-14">3.2 全局TODO列表</a></li>
<li><a href="#sec-15">3.3 任务计划和使用日程表(agenda)</a></li>
</ul>
</li>
<li><a href="#sec-16">4 再会</a></li>
</ul>

<h2><a name="sec-1">1 简介</a></h2>

<p>Introduction
</p>
<p>
Org-mode is a personal information management and outlining tool 
for Emacs. This document is intended to give the reader a "feel" 
for org-mode and to teach basic usage with step-by-step instructions 
and plentiful screenshots. It is not intended to replace the <a href="http://staff.science.uva.nl/~dominik/Tools/org/org.html">manual</a>, 
as only a subset of org-mode's features are covered.
</p>
<p>
*Update* -- This document has been <a href="http://hpcgi1.nifty.com/spen/index.cgi?OrgTutorial">translated into Japaness</a> by a 
Mr. T. Okano. Special thanks to Mr. Okano for doing this.
</p>
<p>
Org-Mode是为Emacs编写的个人信息管理以及编写大纲的工具。本文档将使用逐步的用法
说明和丰富的截图，教给读者Org-Mode基本的应用，让读者对它有基本的认识。本文不是
官方手册的替代品，只涵盖了Org-Mode的特性的一个子集。
</p>
<p>
*更新情况*：本文档已经被Okano先生翻译成<a href="http://hpcgi1.nifty.com/spen/index.cgi?OrgTutorial">日文</a>。在此向他致谢。
</p>

<h3><a name="sec-2">1.1 下载Org-Mode</a></h3>

<p>Obtaining org-mode
</p>
<p>
You can download org-mode from the <a href="http://staff.science.uva.nl/~dominik/Tools/org/">org-mode home page</a>. You should 
download at least <a href="http://staff.science.uva.nl/~dominik/Tools/org/org.zip">the latest version</a> to follow along with this 
tutorial. 
</p>
<p>
你能从<a href="http://staff.science.uva.nl/~dominik/Tools/org/">Org-Mode的官方网页</a>上下载到它。本教程推荐使用<a href="http://staff.science.uva.nl/~dominik/Tools/org/org.zip">最新版本的Org-Mode</a>。
</p>

<h3><a name="sec-3">1.2 安装</a></h3>

<p>Installation
</p>
<p>
Add the following to your .emacs: 
</p>
<p>
在你的.emacs文件中加入如下几行：
</p>
<p>
<pre>
 (add-to-list 'load-path "PATH_TO_WHERE_YOU_UNPACKED_ORGMODE") 
 (require 'org)                                   
 (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
 (define-key global-map "\C-cl" 'org-store-link)
 (define-key global-map "\C-ca" 'org-agenda)
 (setq org-log-done t) 
</pre>
</p>
<p>
This will make sure org gets loaded, and some basic global key 
combinations are defined. We'll go over what "org-store-link" 
and "org-agenda" do later in this document.
</p>
<p>
这样，就能加载Org-Mode并且定义了它的快捷键。我们将在本文档讲述org-store-link
和org-agenda两种模式。
</p>
<p>
One more thing---it's best to set aside a separate directory 
where your org files will be kept. I recommend using ~/org. 
</p>
<p>
另外，最好用一个独立的目录来放你的org文件。我推荐用~/org目录。
</p>

<h2><a name="sec-4">2 基本应用</a></h2>

<p>The basics
</p>
<p>
This section illustrates basic org-mode usage by showing how I 
used org-mode to create this document. 
</p>
<p>
本章将通过描述使用Org-Mode创建本文档的过程，讲解基本的Org-Mode应用。
</p>

<h3><a name="sec-5">2.1 新建一个文件</a></h3>

<p>Creating a new file
</p>
<p>
If you've configured your Emacs initialization file as suggested 
above, Emacs should enter org-mode whenever you visit or create 
a file with the extension ".org".
</p>
<p>
如果你已经照前面的建议配置好了你的Emacs初始化文件(.emacs)，那么当你打开或者
创建一个.org后缀的文件时，Emacs就进入了Org-Mode。
</p>
<p>
I created a new file called "OrgTutorial.org" and saw the "Org" 
indicator in the modeline, showing that we've entered org-mode.
</p>
<p>
我创建了一个文件名为"OrgTutorial.org"的新文件，Emacs的模式栏上出现了"Org"，
表示我们进入了Org-Mode。
</p>

<h3><a name="sec-6">2.2 简单任务列表</a></h3>

<p>Simple task list
</p>
<p>
First I entered a headline called "Tasks" to keep tasks under. 
This isn't necessary but is often convenient, especially when 
you want to keep tasks separate from the body of a document 
you're writing.
</p>
<p>
首先，我输入一个名为"Task"的标题。虽然不一定要这么做，但常常会让事情方便一点，
尤其是当你想把任务列表和你正编辑的文档的正文分开的时候。
</p>
<p>
First-level headlines begin with one star; second-level headlines 
begin with two stars, and so on.
</p>
<p>
第一级的标题以一个"*"号开头，第二级的标题用两个"*"号开头，以此类推。
</p>
<p>
In org-mode, TODO items are always headlines. I entered a TODO 
item for "Start new org file for tutorial." 
</p>
<p>
在Org-Mode里，所有的TODO项目都是以标题形式存在。我现在输入一个TODO项目：
"Start new org file for tutorial."
</p>
<p>
<img src="../images/tutorial-1.png"/>
</p>
<p>
This is a bit silly, because we've already started a new file. 
So, let's mark the TODO item DONE by moving the cursor onto that 
line and hitting C-c C-t, which runs the command org-todo.
</p>
<p>
这有点无聊，因为我们已经创建了一个新文件。这样，让我们把光标移到这一行TODO项目上
并按Ctrl-c和Ctrl-t，把它标记为"DONE"。
</p>
<p>
Here is the result: 
</p>
<p>
这里是结果：
<img src="../images/tutorial-2.png"/>
</p>
<p>
Notice how org-mode uses a timestamp to record when a TODO item 
was closed.
</p>
<p>
Org-Mode用了一个时间戳来记录一个TODO项目在什么时候结束。
</p>
<p>
Let's add some more TODO items. Position the cursor on the next 
line, and hit M-shift-RET to call org-insert-todo-heading. You 
can hit it several times to add several TODOs. 
</p>
<p>
让我们输入更多的TODO项目。光标移到下一行，按Meta-Shift-Enter，调出
org-insert-todo-heading，按多若干次，就能加入若干个TODO项目了。
<img src="../images/tutorial-3.png"/>
</p>

<h3><a name="sec-7">2.3 使用“标题”功能建构一篇文档</a></h3>

<p>Using headlines to structure a document
</p>
<p>
Often the best way to organize your ideas is an outline. My next 
step is to outline the different topics of the tutorial. By doing 
this, you break up the intimidating blank page into a series of 
less-intimidating smaller chunks. Then it becomes easier to fill 
them in.
</p>
<p>
通常，使用大纲是最好的组织你的观点的方法。下一步，我把本教程的不同主题放进大纲。
这样，整个空白页面就能分成一个个小块，让我能更容易地填入内容。
</p>
<p>
Remember that one star begins a first-level heading, and two stars 
begin a second-level heading. If you need deeper nesting, go ahead
and use three or more stars!
</p>
<p>
一颗"*"表示第一级标题，两颗"*"表示第二级标题，如果你需要更多的层次，就用更多的
"*"号。
</p>
<p>
Here is what it looked like after I finished outlining the document:
</p>
<p>
我完成本文档的大纲后，效果如下图：
<img src="../images/tutorial-4.png"/>
</p>
<p>
Notice I marked "Outline document" as DONE after I finished.
</p>
<p>
如上图，我完成大纲后，把"Outline document"标成了"DONE"。
</p>

<h3><a name="sec-8">2.4 在各章节间填充</a></h3>

<p>Filling in the sections
</p>
<p>
You can easily add body text underneath any headline. 
</p>
<p>
你能在任何标题的下面加入正文。
<img src="../images/tutorial-5.png"/>
</p>

<h3><a name="sec-9">2.5 到其他地方的链接</a></h3>

<p>Links to other places
</p>
<p>
In the section on "Obtaining Org-mode" I need to provide a link 
to the org-mode website. A special bracket syntax is used when 
linking:
</p>
<p>
在“下载Org-Mode”一节中我需要提供一个Org-Mode官方网页的链接。我使用了一个
特殊的含有方括号的语法来表示这个链接：
<pre>
 [[link][ description ]]
</pre>
</p>
<p>
Watch how I first type the link and description, leaving open 
the last bracket:
</p>
<p>
看我是怎样输入这个链接和它的描述，不输入最后的半边方括号：
<img src="../images/tutorial-6.png"/>
</p>
<p>
Then when I type the last bracket, the link "collapses" and 
simply shows the description.
</p>
<p>
然后我输入这半边方括号，该链接消失，只显示它的描述。
<img src="../images/tutorial-7.png"/>
</p>
<p>
Try moving the cursor over the link and press C-c C-o for 
org-open-at-point.
</p>
<p>
移动光标到该链接上，按Ctrl-c和Ctrl-o，调用org-open-at-point。
</p>
<p>
You can also link to local files. Try visiting another file
---for example, your emacs initialization file. Then hit C-c l 
to call org-store-link. You'll see a message that a link was 
stored to the current location in the file you're visiting.
</p>
<p>
你也能链接到本地文件。试试看浏览另外一个文件，比如说你的emacs初始化文件
(.emacs)，然后连续按Ctrl-c和l键调用org-store-link。你会看到一条信息，
说已经把你正在浏览的文件中的位置存为一个链接。
</p>
<p>
Then switch back to your org-mode buffer and paste the link 
using C-c C-l to call org-insert-link. (You may need to press 
the arrow keys to scroll through and find the link you just 
recorded.) 
</p>
<p>
然后回到你的Org-Mode的buffer，用Ctrl-c和Ctrl-l来调出org-insert-link
来插入该链接。(你可以用方向键来翻查到你刚才记录的链接。)
</p>

<h3><a name="sec-10">2.6 文档的提纲</a></h3>

<p>Overviews of a document
</p>
<p>
By this time, my document is getting longer and I can no longer 
fit it all on one screen. Org-mode makes it easy to get an 
overview of your document by pressing shift-TAB. 
</p>
<p>
这时，我的文档更长了，一个屏幕容纳不下它的全部内容。使用shift-tab这个组合键，
Org-Mode能让你更容易了解你的文档的概要。
<img src="../images/tutorial-9.png"/>
</p>
<p>
Notice that just the top-level headings are shown. You can hit 
shift-TAB again to show all headings, including TODO items:
</p>
<p>
需要注意的是只会显示最高层的标题。再次按下shift-tab的组合键，所有的标题和
TODO项目就会显示出来：
<img src="../images/tutorial-10.png"/>
</p>
<p>
Then hit it again to show a normal view of the document, with 
section bodies shown:
</p>
<p>
然后，再按这个组合键，显示正常情况的，包含各个章节的整个文档：
<img src="../images/tutorial-11.png"/>
</p>

<h3><a name="sec-11">2.7 给任务加注说明</a></h3>

<p>Adding notes to a task
</p>
<p>
You can put as much text as you want under a TODO item's 
heading. In fact, you can even have subheadings under a TODO, 
and TODOs within TODOs!
</p>
<p>
你能把你所需要的尽可能多的文字放在一个TODO项目的标题之后。甚至，你能把副标题
放在一个TODO项目的下面，把TODO项目嵌套起来。
</p>
<p>
Being able to annotate tasks makes it easy to collect related 
links and thoughts along with a task. Being able to nest tasks 
is great for modeling workflow---quite often, a larger task is 
broken into smaller subtasks you want to check off as you do 
them.
</p>
<p>
对任务进行注释，让收集和处理和某个任务相关的链接和想法更容易。任务的层次化嵌套
对工作流程的模式化很有帮助——通常，一个大的任务会细分为更小的，可以逐项完成的
子任务供你察看。
</p>


<h2><a name="sec-12">3 高级功能简述</a></h2>

<p>A taste of advanced features
</p>
<p>
Before we finish, we'll touch on org-mode's global TODO list, 
scheduling, and agenda features. These are used to combine 
relevant TODO items from different org files into a prioritized, 
chronological display. You can also use it to see which tasks 
were completed, and when. 
</p>
<p>
在本篇简明教程结束前，我们将介绍Org-Mode的全局TODO列表、计划任务和日程表
(agenda)功能。这些功能用于从不同的org文件中把相关的TODO项目合并成以重要性
和发生的时间为顺序陈列的项目列表。你也能用这些功能来知道哪些任务是已经完成的，
以及它们是什么时候完成的。
</p>

<h3><a name="sec-13">3.1 设置</a></h3>

<p>Setup
</p>
<p>
First you must set the variable org-agenda-files so that 
org-mode will know which files to search for TODOs and 
scheduled items.
</p>
<p>
首先，你必须设置变量org-agenda-files，以便让Org-Mode知道在哪些文件
里搜寻TODO和计划项目。
</p>
<p>
Let's imagine you already have several org files---say, one 
for work, one for home, and one for school.
</p>
<p>
假设，你已经有了几个org文件，比如说，一个工作用的org文件，一个家务用的
org文件，一个学校用的org文件。
</p>
<p>
Then you'd add the following to your emacs initialization 
file: 
</p>
<p>
这样的话，你可以在你的emacs初始化文件(.emacs)里加入如下几行：
</p>
<p>
<pre>
 (setq org-agenda-files (list "~/org/work.org"  
                            "~/org/school.org"  
                             "~/org/home.org"))  
</pre>
</p>




<h3><a name="sec-14">3.2 全局TODO列表</a></h3>

<p>The global TODO list
</p>
<p>
Press C-c a t to enter the global todo list. Org-mode will 
scan the files in org-agenda-files and present a listing of all 
the open TODO items: 
</p>
<p>
按Ctrl-c、a、t进入全局TODO列表。Org-Mode将在org-agenda-files里的文件中
搜索开放的TODO项目，并列出项目的列表：
<img src="../images/tutorial-16.png"/>
</p>
<p>
You can move the cursor around to the different todo items, and 
hit "t" to mark an item DONE, or hit RET to jump to the source 
file where the TODO is located.
</p>
<p>
你能在不同的TODO项目中移动光标，并用t键把项目标注成“DONE”（已完成）；或者
在TODO项目上按回车跳到该项目所在的源文件。
</p>

<h3><a name="sec-15">3.3 任务计划和使用日程表(agenda)</a></h3>

<p>Scheduling tasks and using the agenda
</p>
<p>
Let's say I want to schedule "Finish document" for today. I move 
the cursor to the line after the TODO item "Finish document", and 
hit C-c C-s to run org-schedule. The calendar pops up, and I can 
either enter or click the desired date: 
</p>
<p>
我计划今天来做“Finish documnet”（“完成文档”）。我把光标移到TODO项目“Finish
documnet”（“完成文档”）上，按Ctrl-c和Ctrl-s来运行org-schedule命令。日历跳
了出来，我能输入或者点击我选择的日期：
<img src="../images/tutorial-12.png"/>
</p>
<p>
Once I select the date, org-mode inserts a scheduling timestamp 
after the TODO item:
</p>
<p>
当我选择好日期，Org-Mode在这个TODO项目后插入了一个时间戳：
<img src="../images/tutorial-13.png"/>
</p>
<p>
Now save your file, and hit C-c a a for org-agenda. A display 
of this week's scheduled items are displayed:
</p>
<p>
现在把你的文档存盘，并依次键入Ctrl-c、a、a来进入org-agenda模式。本星期的
计划中项目显示了出来：
<img src="../images/tutorial-14.png"/>
</p>
<p>
Now press "l" (lowercase L) to turn on log display. This displays 
the all finished tasks and their completion times.
</p>
<p>
现在按l键（L的小写字母）显示日志（log）。这样会显示所有已经完成的任务和它们完成
的时间。
<img src="../images/tutorial-15.png"/>
</p>


<h2><a name="sec-16">4 再会</a></h2>

<p>Farewell
</p>
<p>
This has been only a brief tour of org-mode. More excitement awaits 
you at the <a href="http://staff.science.uva.nl/~dominik/Tools/org/org.html">online org-mode manual</a>. 
</p>
<p>
本文只是Org-Mode的简明教程。在<a href="http://staff.science.uva.nl/~dominik/Tools/org/org.html">Org-Mode的在线文档</a>里有更多的让人兴奋的特征等着你
发掘。
</p><p class="author"> Author: Original Version: David O'Toole   Translate by: Hokmen Chan
<a href="mailto:hokmen (dot) chan (AT) gmail (dot) com">&lt;hokmen (dot) chan (AT) gmail (dot) com&gt;</a>
</p>
<p class="date"> Date: 2007/01/01 12时15分30秒</p>
</body>
</html>
